package com.rd.sys.dto.commmon.enums;

import baseproj.common.constants.BaseEnum;
import baseproj.inter.Message;

public class SubscriptionEnum {

    /**
     * 类型信息.
     */
    public enum Type implements BaseEnum {
        /** 租赁. */
        HIRE("1", Message.getMessage("user.subscription.hire")),

        /** 整售. */
        RETAIL("2", Message.getMessage("user.subscription.retail"));

        /** The code. */
        private final String code;

        /** The name. */
        private final String name;

        /**
         * Instantiates a new param type.
         * 
         * @param code
         *            the code
         * @param name
         *            the name
         */
        Type(String code, String name) {
            this.code = code;
            this.name = name;
        }

        /**
         * Equals.
         * 
         * @param value
         *            the value
         * @return true, if successful
         * @version
         */
        public boolean equals(String value) {
            return this.code.equals(value);
        }

        /**
         * Gets the code.
         * 
         * @return the code
         */
        @Override
        public String getCode() {
            return code;
        }

        /**
         * Gets the name.
         * 
         * @return the name
         */
        @Override
        public String getName() {
            return name;
        }
    }

    /**
     * 状态信息.
     */
    public enum Status implements BaseEnum {
        /** 正常. */
        NORMAL("1", Message.getMessage("sys.network.normal")),

        /** 暂停. */
        PAUSED("2", Message.getMessage("sim.status.suspended")),

        /** 注销. */
        LOGOUT("3", Message.getMessage("sys.login.log.logout.name"));

        /** The code. */
        private final String code;

        /** The name. */
        private final String name;

        /**
         * Instantiates a new type.
         * 
         * @param code
         *            the code
         * @param name
         *            the name
         */
        Status(String code, String name) {
            this.code = code;
            this.name = name;
        }

        /**
         * Gets the code.
         * 
         * @return the code
         */
        @Override
        public String getCode() {
            return code;
        }

        /**
         * Gets the name.
         * 
         * @return the name
         */
        @Override
        public String getName() {
            return name;
        }

    }
}
